module zen_of_flang_m

    use, intrinsic :: iso_fortran_env, only: stdout => output_unit
    implicit none
    private

    public :: this, Linux

contains

    subroutine this()
    !! This is Zen of Flang (FORTRAN)
        integer i
        character(80), parameter :: &
            zen_of_flang(10) = &
            [character(80) :: &
             "The Zen of FLANG, by zoziha @Shenzhen::CHINA (2022)", &
             "", &
             "1. *Opened* is better than closed.", &
             "2. *Newer* is better than older or never.", &
             "3. *Lightweight* is better than cumbersome.", &
             "4. *Encapsulation* (封装) is better than exposure.", &
             "5. *Functional, object-oriented, structured programming*.", &
             "6. Focus on *scientific computing*.", &
             "7. Fortran is *good friends with other languages*.", &
             "8. Always leaning towards *modern programming tools*." &
             ]

        do i = 1, 10
            write (stdout, "(A)") zen_of_flang(i)
        end do
    end subroutine this

    subroutine Linux()
    !! This is Zen of Linux
        integer i
        character(80), parameter :: &
            zen_of_linux(5) = &
            [character(80) :: &
             "The Zen of Unix / Linux Programs, by Peter H. Salus (1994)", &
             "", &
             "1. Write programs that do one thing and do it well.", &
             "2. Write programs to work together.", &
             "3. Write programs to handle text streams, because that is a universal interface." &
             ]
        do i = 1, 5
            write (stdout, "(A)") zen_of_linux(i)
        end do
    end subroutine Linux

end module zen_of_flang_m
